<%@ page import="java.util.HashMap,common.CommonUtil,java.util.*,common.*" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="/WEB-INF/commontags.tld" prefix="common" %><%--페이징처리tag--%>
<%
UserSession userSession = (UserSession)session.getAttribute("user"); 

String login_id = null;
String user_id = null;
String level = null;
String admin_ent_id = null;

if(userSession!= null){
	login_id = userSession.getLogin_id();
	user_id = userSession.getUser_id();
	level = userSession.getAdmin_level();
	admin_ent_id = userSession.getEnt_id();
}

String search_combo 	= CommonUtil.nvl(request.getParameter("search_combo"),"");
String keyword 		= CommonUtil.nvl(request.getParameter("keyword"),"");
String line_number	= CommonUtil.nvl(request.getParameter("line_number"),"10");
//페이징 처리 Start
//페이지 표시정보 받기 혹은 검색입력창
String curr_page = CommonUtil.nvl(request.getParameter("curr_page"),"1");

String one_group = CommonUtil.nvl(request.getParameter("one_group"),"10");
String total_count = CommonUtil.nvl(request.getParameter("total_count"),"0");
//페이징 처리 End

String ent_id	= CommonUtil.nvl(request.getParameter("ent_id"),""); 
String gubun	= CommonUtil.nvl(request.getParameter("gubun"),""); 
String start_date	= CommonUtil.nvl(request.getParameter("start_date"),""); 
String end_date	= CommonUtil.nvl(request.getParameter("end_date"),"");

/*
if(gubun.equals("")){
	gubun = "OPIC";
}
*/

HashMap listMap=(HashMap)request.getAttribute("list_map");

HashMap map  = null;
ArrayList list=null;

HashMap map_1  = null;
ArrayList list_1=null;

HashMap map_2  = null;
ArrayList list_2=null;

String reg_dt 	= "";
String reg_cnt 		= "";
String per_cnt	= "";

String s_total_cnt	= "0";
String s_give_before_cnt	= "0";
String s_progress_cnt	= "0";
String s_end_cnt	= "0";
String s_holding_cnt	= "0";
String v_start_date	= ""; 
String v_end_date	= "";

String member_test_code 		= "";
String member_id 		= "";
String test_state 		= "";
String test_state_str 		= "";
String test_state_holding = "";
String login_id_map 		= "";
String login_name 	= "";
String email	= "";
String cell_no	= "";
String result_code	= "";

String sign_date 		= "";
String sign_state 		= "";

String rater_id	= "";
String rating_state	= "";
String rating_start_time	= "";
String rating_close_time	= "";
String rating_reg_dt	= "";

String r_num="";

if (listMap!=null){
    list_1=(ArrayList)listMap.get("mainContent_1");
    list_2=(ArrayList)listMap.get("mainContent_2");
}


if(list_1 != null){
	if(list_1.size() > 0){
		s_total_cnt = CommonUtil.nvl((String)((HashMap)list_1.get(0)).get("s_total_cnt"),"0");
	}
}


if(start_date.equals("")){
	start_date = v_start_date;
}

if(end_date.equals("")){
	end_date = v_end_date;
}

String[] start_date_arr = start_date.split("-");
String[] end_date_arr = end_date.split("-");
%>
<jsp:include page="/jsp/common/header.jsp"></jsp:include>

<style>
body{background-color:#fff;background:#ffffff}
</style>

<form name="mainform"  method="post" action = "/speaking.pb" >
	<div id="bodyContainer">
        <div id="contents">
          
          
          <div class="boxContainer">
          	<dl title="날짜별 통계">
              <dt>날짜별 통계</dt>
            </dl>
            <table class="graphTb">
              <tr>
                <th width="120">일자</th>
                <th width="750">그래프</th>
                <th>응시횟수</th>
              </tr>
<%               

    if (list_1!=null && list_1.size()> 0) {
    	for(int i=0; i<list_1.size(); i++){
	      map=(HashMap)list_1.get(i);
	      reg_dt = CommonUtil.nvl((String)map.get("reg_dt"));
	      reg_cnt = CommonUtil.nvl((String)map.get("reg_cnt"));
	      per_cnt = CommonUtil.nvl((String)map.get("per_cnt"));
%>
			  <tr>
                <td><%=reg_dt %></td>
                <td class="bar"><img src="img/bg_bar02.gif" alt="그래프바" width="<%=per_cnt%>%" height="10" /><br />
                  <%=per_cnt%>%</td>
                <td><%=reg_cnt %></td>
              </tr>
<%	      
    	}
    }else{
%>
              <tr>
                <td colspan=4 align=center>응시 자료가 없습니다.</td>
              </tr>
<%} %>              
              
            </table>            
          </div>
          
          
        </div>
      </div>


<input type="hidden" name="cmd" value="">
<input type="hidden" name="user_id" value="<%=user_id %>">
<input type="hidden" name="member_test_code" value="">
</form>

<iframe name='hidden_frm'  width='0' height='0' SCROLLING='AUTO' frameborder='0'></iframe>
<jsp:include page="/jsp/common/bottom.jsp"></jsp:include>
